<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
      xmlns:pt="http://java.sun.com/jsf/passthrough">
    <h:head>
        <title>Admin Page</title>        
    </h:head>
    <h:body>
        <ui:composition template="com.template/AdminTemplate.xhtml">
            <ui:define name="page-content"> 
                <br/>
                <div class="row">
                    <div class="panel panel-default">
                        <div class="panel-heading btn-group">
                            <div class="input-group custom-search-form">
                                <h:inputText class="form-control" pt:placeholder="Search by time rangle..." value="#{showEvent.day}"/>
                                <span class="input-group-btn">
                                    <h:commandLink class="btn btn-danger" actionListener="#{showEvent.ShowMoreEventComming()}">
                                        <i class="fa fa-search"></i>
                                    </h:commandLink>
                                </span>                                
                            </div>
                        </div>
                        <div class="panel-body">
                            <c:choose>
                                <c:when test="#{showEvent.eventComming != null}">
                                    <c:forEach var="i" items="#{showEvent.eventComming}">
                                        <div class="col-sm-5">                                            
                                            <h4><i class="fa fa-map-marker fa-fw"></i>address</h4>
                                            <iframe width="100%" height="380"  frameborder="0" style="border:0"
                                                    src="#{i.map}">
                                            </iframe>
                                        </div>
                                        <div class="col-sm-7">
                                            <div class="row">
                                                <div class="col-sm-12">
                                                    <div class="panel panel-red">
                                                        <div class="panel-heading">                                            
                                                            <span class="label label-danger"><i class="fa fa-flag-checkered fa-fw"></i>THE HOTTEST EVENT</span>
                                                        </div>
                                                        <div class="panel-body">
                                                            <p class="lead">#{i.eventName}</p>
                                                            <p>
                                                                <a href="event.xhtml?eventId=#{i.eventID}"><img class=" thumbnail" src="#{i.avatar}" width="100%" height="200px;"/></a>
                                                            </p>
                                                            <p>#{i.shortdes}
                                                                <a href="event.xhtml?eventId=#{i.eventID}">read more..</a>.
                                                            </p>
                                                            <p>
                                                                <small><i class="fa fa-clock-o fa-fw"></i><code>#{i.timeStart}</code> to <code>#{i.timeEnd}</code></small>
                                                            </p>
                                                            <p>
                                                                <a href="employees.xhtml?eventId=#{i.eventID}"><span class="badge">#{i.total}</span><em> employees registered.</em></a>                                                                
                                                            </p> 
                                                            <p>
                                                                <small><i class="fa fa-map-marker fa-fw"></i>#{i.address}</small>
                                                            </p>
                                                            <div class="btn-group-sm">
                                                                <a class="btn btn-danger btn-outline" href="event.xhtml?eventId=#{i.eventID}">View Details</a>
                                                                <a class="btn btn-danger btn-outline" href="eventpu.xhtml?eventId=#{i.eventID}"><i class="fa fa-edit fa-fw"></i>Edit</a>
                                                            </div> 
                                                        </div>
                                                        <!-- /.panel-body -->
                                                    </div>
                                                </div>                                
                                            </div>
                                        </div>
                                        <br/>
                                    </c:forEach>

                                </c:when>
                                <c:otherwise>
                                    nothing in herer..
                                </c:otherwise>
                            </c:choose>                            
                        </div>

                    </div>                    
                </div>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

